package com.example.shardingjdbcdemo.entity.join;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

/*
*
CREATE TABLE `t_order_item_202301` (
  `item_id` bigint NOT NULL,
  `order_id` bigint DEFAULT NULL,
  `product_name` varchar(100) DEFAULT NULL,
  `quantity` int DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `busi_date` date DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`item_id`),
  KEY `idx_order_id` (`order_id`),
  KEY `idx_busi_date` (`busi_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;*/
@Data
@TableName("t_order_item")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class JoinOrderItem {
    @TableId(type = IdType.AUTO)
    private Long itemId;
    private Long orderId;
    private String productName;
    private Integer quantity;
    private Double price;
    private LocalDate busiDate;
    private LocalDateTime createTime;
}
